package com.asia5b.a5mall.order.adapter

import android.widget.TextView
import com.asia5b.a5mall.middleware.model.bean.MenuBean
import com.asia5b.a5mall.order.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * Created by zhangyuncai on 2020/1/14.
 */
class OrderDetailmAdapter(list: ArrayList<MenuBean>) :
        BaseQuickAdapter<MenuBean, BaseViewHolder>(R.layout.item_orderdetail_actionadapter, list) {
    override fun convert(helper: BaseViewHolder, item: MenuBean) {
        val tv_orderdetail_action = helper.getView<TextView>(R.id.tv_orderdetail_action)
        tv_orderdetail_action.isSelected = item.type == 1
        helper.setText(R.id.tv_orderdetail_action, item.value)
    }
}